package com.example.demo.service;

import javax.annotation.Resource;
import javax.transaction.Transactional;

import org.springframework.stereotype.Service;

import com.example.demo.entity.Person;
import com.example.demo.repository.PersonRepository;

@Service
public class PersonService {

	
	@Resource
	private PersonRepository personRepository;
	
	

	@Transactional
	public Person update(Person person) {

		return personRepository.save(person);
		
	}
}
